Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

Back Buffer Imaging Procedure Flags

The QuickTime VR Manager defines three sets of flags for use in connection with a back buffer imaging procedure: (1) a set of flags for the flags field in an area of interest structure passed to the QTVRSetBackBufferImagingProc function, (2) a set of flags for the flagsIn parameter to a back buffer imaging procedure, and (3) a set of flags for the flagsOut parameter to a back buffer imaging procedure.

The flags field in an area of interest structure (link) passed to the function QTVRSetBackBufferImagingProc is a long integer whose bits indicate when to call the back buffer imaging procedure for the specified area of interest. If a bit in the long integer is set, the back buffer imaging procedure is called at the corresponding time. The bits are addressed using these constants:

enum {
    kQTVRBackBufferEveryUpdate                      = 1L << 0,
    kQTVRBackBufferEveryIdle                        = 1L << 1,
    kQTVRBackBufferAlwaysRefresh                    = 1L << 2
};

Constant descriptions

kQTVRBackBufferEveryUpdate
If this bit is set, the back buffer imaging procedure is to be called whenever QuickTime VR is about to update the window containing the specified QuickTime VR movie instance. That is, the procedure is called just before QuickTime VR unwarps the back buffer image into the prescreen buffer and redraws the screen image.
kQTVRBackBufferEveryIdle
If this bit is set, the back buffer imaging procedure is to be called when either MCIsPlayerEvent(idle) or MCIdle is called). Its purpose is to cause the software to draw as often as possible.
kQTVRBackBufferAlwaysRefresh
If this bit is set, the back buffer is always refreshed to the proper movie data just before your back buffer imaging procedure is called. If your back buffer imaging procedure completely overwrites the rectangle passed to it, you should not set this bit.

The flagsIn parameter passed to a back buffer imaging procedure specifies the event or operation that caused your procedure to be called, as well as other information about the state of the back buffer when your procedure is called. The bits in the flagsIn parameter are addressed using these constants:

enum {
    kQTVRBackBufferRectVisible                      = 1L << 0,
    kQTVRBackBufferWasRefreshed                     = 1L << 1
};

Constant descriptions

kQTVRBackBufferRectVisible
If this bit is set, the specified rectangle is currently visible. Your back buffer imaging procedure is always called at least once with this bit set, when the rectangle first becomes visible. When the rectangle becomes no longer visible, your back buffer imaging procedure is called with this bit clear.
kQTVRBackBufferWasRefreshed
If this bit is set, QuickTime VR refreshed the back buffer prior to calling your back buffer imaging procedure.

Before returning from your back buffer imaging procedure, you should set the flagsOut parameter to indicate what actions you performed in your procedure. You can set bits in that parameter using this constant:

enum {
    kQTVRBackBufferFlagDidDraw                      = 1L << 0
};

Constant description

kQTVRBackBufferFlagDidDraw
Set this bit if your back buffer imaging procedure performed any drawing in the back buffer.

© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |